<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>文献资源管理系统-套信息维护审核模板</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="文献资源管理系统-套信息维护审核模板">
<meta name="description" content="文献资源管理系统-套信息维护审核模板">
<meta name="author" content="yinqi">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
</head>
  <style>
    .col-lg-12{
      margin: auto;
      top: 17px;
      left: 0;
      bottom: 0;
      right: 0;
      position: absolute;
    }
    /* body {
      margin: 0;
    }
    #button {
      background-color: #33cabb; 
      border-left-color:#33cabb;
      border-right-color:#33cabb;
      border-top-color:#33cabb;
      border-bottom-color:#33cabb;
    }
    #example-tags{
    width: 30%;
    margin-left: -22px;
    width: 115%;
    margin-top: -25px;
    } */
  </style>
 
<body>
 
 

<div class="lyear-layout-web" id="app">
  <div class="lyear-layout-container">
    <!--左侧导航-->
    <div class="lyear-layout-sidebar-scroll">
      <nav class="sidebar-main">
        <ul class="nav nav-drawer">       
        </ul>
      </nav>
    </div>
    <!--End 左侧导航-->
    
    <!--头部信息-->
 
    <!--End 头部信息-->
    
    <!--页面主要内容-->

    <main class="lyear-layout-content" >
      <div class="container-fluid">
        
        <div class="row">
          <div class="col-lg-12" >
            <div class="card">
              <div class="card-toolbar clearfix">
                <form class="pull-right search-bar" method="get" action="#!" role="form">
                  <div class="input-group">
                    <div class="input-group-btn">
                      <input type="hidden" name="search_field" id="search-field" value="title">
                      <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                        订购信息维护 <span class="caret"></span>
                      </button>
                    </div>
                    <input type="text" class="form-control"  name="keyword" v-model="order.title" v-on:keyup="getlist(1)"  placeholder="请输入名称">
                  </div>
                </form>
                <div class="toolbar-btn-action">
                  <a class="btn btn-primary m-r-5" type="button" @click="exportExcel()"><i class="mdi mdi-plus"></i> 导出</a>
                </div>
              </div>
              <div class="card-body">
                
                <div class="table-responsive">
                  <table class="table table-bordered">
                    <template>
                      <el-table
                        v-loading="loading"
                        :data="list"
                        style="width: 100%">
                        <el-table-column type="selection" width="65"></el-table-column>
                        <el-table-column
                          prop="id"
                          label="序号"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="title"
                          label="题名"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="pay"
                          label="支付金额">
                        </el-table-column>
                        <el-table-column
                          prop="estimatedAmount"
                          label="预估金额">
                        </el-table-column>
                        <el-table-column
                          prop="settlementPrice"
                          label="结算价格">
                        </el-table-column>
                        <el-table-column
                        prop="fillingMoney"
                        label="补款金额">
                      </el-table-column>
                      <el-table-column
                      prop="carrier"
                      label="载体">
                    </el-table-column>
                      <el-table-column
                      prop="orderType"
                      label="订购类型">
                    </el-table-column>
                    <el-table-column
                    prop="isOrder"
                    label="是否订到">
                  </el-table-column>
                    <el-table-column
                    prop="foreignPrice"
                    label="外币价格">
                  </el-table-column>
                    <el-table-column
                    prop="returnPrice"
                    label="退款金额">
                  </el-table-column>
                  <el-table-column label="操作" align="center" min-width="100">
              　　　　<template slot-scope="scope">
                          <div class="btn-group">
                            <a class="btn btn-xs btn-default" @click="unit(scope.row.id)"  type="button" data-toggle="modal" data-target="#bianji" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i>编辑</a>
                          </div>
              <!-- 　　　　　　<el-button type="text" @click="checkDetail(scope.row.phone)">查看详情</el-button>
              　　　　　　<el-button type="info" @click="modifyUser(scope.row.phone)">修改</el-button>
              　　　　　　<el-button type="info" @click="deleteUser(scope.row.phone)">删除</el-button> -->
              　　　　</template>
              　　</el-table-column>
                      </el-table>
                      
                    </template>
                   
                  </table>
                </div>
                <nav>
                  <ul class="pagination pagination-circle">
                    <li class="active"><a>{{totals}}</a></li>
                    <li>
                      <a type="button" @click="getlist(prePage)">
                        <span><i class="mdi mdi-chevron-left" ></i></span>
                      </a>
                    </li>
                    <li ><a>{{currentPage}}</a></li>
                    <li>
                      <a type="button" @click="getlist(nextPage)">
                        <span><i class="mdi mdi-chevron-right"></i></span>
                      </a>
                    </li>
                  </ul>
                </nav>  
              
                <!-- 修改模态框（Modal） -->
                <form action=""  class="form-horizontal" role="form"> 
                  <div class="modal fade" id="bianji" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                      <div class="modal-dialog">
                          <div class="modal-content">
                              <div class="modal-header">
                                  <h4 class="modal-title" id="myModalLabel">
                                      订购信息编辑
                                  </h4>
                                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                      &times;
                                  </button>
                              </div>
                             
                                    <div class="modal-body" style="height: 100%;">         
                                        <div class="form-group">
                                            <label for="lastname" class="col-sm-3 control-label">题名</label>
                                            <div class="col-sm-7">
                                              <input class="form-control" type="text" v-model="order.title" placeholder="题名">
                                            </div>
                                            
                                        </div>
                                            <div class="form-group">
                                              <label for="lastname" class="col-sm-3 control-label">载体</label>
                                              <div class="col-sm-7">
                                                <input class="form-control" type="text" v-model="order.carrier" placeholder="载体">
                                              </div>
                                          </div>
                                          <div class="form-group">
                                            <label for="lastname" class="col-sm-3 control-label">订购机制</label>
                                            <div class="col-sm-7">
                                              <input class="form-control" type="text" v-model="order.orderOrganization" placeholder="订购机制">
                                            </div>
                                          </div>
                                            <div class="form-group">
                                              <label for="lastname" class="col-sm-3 control-label">订购类型</label>
                                              <div class="col-sm-7">
                                                <input class="form-control" type="text" v-model="order.orderType" placeholder="订购类型">
                                              </div>
                                            </div>
                                              <div class="form-group">
                                                <label for="lastname" class="col-sm-3 control-label">订购年份</label>
                                                <div class="col-sm-7">
                                                  <input class="form-control" type="text" v-model="order.orderYear" placeholder="订购年份">
                                                </div>
                                            </div>
                                                <div class="form-group">
                                                  <label for="lastname" class="col-sm-3 control-label">审核状态</label>
                                                  <div class="col-sm-7">
                                                    <input class="form-control" type="text" v-model="order.reviewStatus" placeholder="审核状态">
                                                  </div>
                                              </div>
                                                <div class="form-group">
                                                  <label for="lastname" class="col-sm-3 control-label">代理公司</label>
                                                  <div class="col-sm-7">
                                                    <select v-model="order.agencyCompanyId" class="form-control">
                                                      <option v-for="(item,index) in admin" :value="item.id">{{item.name}}</option>
                                                    </select>
                                                  </div>
                                              </div>
                                              <div class="form-group">
                                                <label for="lastname" class="col-sm-3 control-label">户号</label>
                                                <div class="col-sm-7">
                                                  <select v-model="order.doorNoId" class="form-control">
                                                    <option v-for="(item,index) in admin" :value="item.roleId">{{item.doorNo}}</option>
                                                  </select>
                                                </div>
                                            </div>
                        
                                              <div class="form-group">
                                                <label for="lastname" class="col-sm-3 control-label">支付金额</label>
                                                <div class="col-sm-7">
                                                  <div class="card-body" id="example-tags">         
                                                    <input   class="form-control" type="text"  v-model="order.pay"  placeholder="支付金额" >
                                                  </div>
                                                </div>
                                            </div>
                                              <div class="form-group">
                                                <label for="lastname" class="col-sm-3 control-label">经费支持</label>
                                                <div class="col-sm-7">
                                                  <select v-model="order.financialSupportId" class="form-control">
                                                    <option>原存量</option>
                                                  </select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                              <label for="lastname" class="col-sm-3 control-label">是否到货</label>
                                              <div class="col-sm-7">
                                                <div class="card-body" id="example-tags">         
                                                  <input   class="form-control" type="text"  v-model="order.isArrival"  placeholder="是否到货" >
                                                </div>
                                              </div>
                                          </div>
                                          <div class="form-group">
                                            <label for="lastname" class="col-sm-3 control-label">是否订到</label>
                                            <div class="col-sm-7">
                                              <div class="card-body" id="example-tags">         
                                                <input   class="form-control" type="text"  v-model="order.isOrder"  placeholder="是否订到" >
                                              </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                          <label for="lastname" class="col-sm-3 control-label">预估金额</label>
                                          <div class="col-sm-7">
                                            <div class="card-body" id="example-tags">         
                                              <input   class="form-control" type="text"  v-model="order.estimatedAmount"  placeholder="预估金额" >
                                            </div>
                                          </div>
                                      </div>
                                      <div class="form-group">
                                        <label for="lastname" class="col-sm-3 control-label">外币价格</label>
                                        <div class="col-sm-7">
                                          <div class="card-body" id="example-tags">         
                                            <input   class="form-control" type="text"  v-model="order.foreignPrice"  placeholder="外币价格" >
                                          </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                      <label for="lastname" class="col-sm-3 control-label">结算价格</label>
                                      <div class="col-sm-7">
                                        <div class="card-body" id="example-tags">         
                                          <input   class="form-control" type="text"  v-model="order.settlementPrice"  placeholder="结算价格" >
                                        </div>
                                      </div>
                                  </div>
                                    <div class="form-group">
                                      <label for="lastname" class="col-sm-3 control-label">退款金额</label>
                                      <div class="col-sm-7">
                                        <div class="card-body" id="example-tags">         
                                          <input   class="form-control" type="text"  v-model="order.returnPrice"  placeholder="退款金额" >
                                        </div>
                                      </div>
                                  </div>
                                  <div class="form-group">
                                    <label for="lastname" class="col-sm-3 control-label">补款金额</label>
                                    <div class="col-sm-7">
                                      <div class="card-body" id="example-tags">         
                                        <input   class="form-control" type="text"  v-model="order.fillingMoney"  placeholder="补款金额" >
                                      </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                  <label for="lastname" class="col-sm-3 control-label">开通范围</label>
                                  <div class="col-sm-7">
                                    <div class="card-body" id="example-tags">         
                                      <input   class="form-control" type="text"  v-model="order.openRange"  placeholder="开通范围" >
                                    </div>
                                  </div>
                              </div>
                                <div class="form-group">
                                  <label for="lastname" class="col-sm-3 control-label">数据库支持</label>
                                  <div class="col-sm-7">
                                    <div class="card-body" id="example-tags">         
                                      <input   class="form-control" type="text"  v-model="order.databaseSupport"  placeholder="数据库支持" >
                                    </div>
                                  </div>
                              </div>
                              <div class="form-group">
                                <label for="lastname" class="col-sm-3 control-label">印本订购方式</label>
                                <div class="col-sm-7">
                                  <div class="card-body" id="example-tags">         
                                    <input   class="form-control" type="text"  v-model="order.printerMethodId"  placeholder="印本订购方式" >
                                  </div>
                                </div>
                            </div>
                              </div>
                              <div class="modal-footer">
                                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                  <el-button id="button" data-dismiss="modal" class="btn btn-primary" type="primary"  @click.native.prevent="update" :loading="loading">提交</el-button>
                              </div>
                          </div>
                      </div>
                  </div>
                </form>       
              </div>
            </div>
          </div>
          
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
<!-- <script type="text/javascript" src="js/main.min.js"></script> -->
<!--标签插件-->
<script src="js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="js/main.min.js"></script>

 <script src="https://cdn.bootcss.com/vue/2.6.9/vue.min.js"></script>
    <script src="https://cdn.bootcss.com/axios/0.19.0/axios.min.js"></script>

    <!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript">
$(function(){
    $('.search-bar .dropdown-menu a').click(function() {
        var field = $(this).data('field') || '';
        $('#search-field').val(field);
        $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
    });
});
new Vue({
  el:"#app",
  data:{
    list:[],
    admin:[],
    loading: false,
    currentPage:1, //当前页码
    size:5, 
    totals:"",
    prePage:1,
    nextPage:1,
    totalPage:1, //总页
    order:{},

    wid:""
    
  },
  created () {
    this.getlist();
  },
  methods: {
    getlist(){

      this.loading = true;
      setTimeout(() => {
      this.loading = false;
        
      axios.post("http://29n01o8660.oicp.vip/smaintenance/orderList/")
      .then(res => {
        this.list = res.data;      
        // this.totals = res.data.data.total;
        // this.currentPage = currentPage;
        // this.totalPage = Math.ceil(this.totals/this.size);
        // this.prePage = currentPage>1?currentPage-1:currentPage;
        // this.nextPage = currentPage<this.totalPage?currentPage+1:currentPage;    
      })
      .catch(err => {
      })
    }, 2000);
      
      axios.get("http://29n01o8660.oicp.vip/smaintenance/findCompany")
      .then(res => {
        this.admin = res.data
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })
    },
    unit(wid){
        window.localStorage.setItem("wid",wid);
        axios.get("http://29n01o8660.oicp.vip/smaintenance/findOrderId/"+wid).then(msg=>{
          console.log(msg);
          this.order=msg.data;
        })
    },
    update(){
     
      this.wid=window.localStorage.getItem("wid");
      
      axios.put("http://29n01o8660.oicp.vip/smaintenance/orderUpdate/"+this.wid,this.order).then(msg=>{
        alert("修改成功");
      })
      
      .catch(err => {
        console.error(err); 
      })
    },
    exportExcel(){
      this.loading = true;
    setTimeout(() => {
      this.loading = false;

      this.$message({
      message: '恭喜你，导出成功',
      type: 'success'
        });

          location.href= "http://29n01o8660.oicp.vip/smaintenance/listOutPutExcel1";

      }, 2000);
   }
    
  }
})
</script>
</body>
</html>